﻿<%@ Page Language="VB" MasterPageFile="~/msrAdministrator.master" AutoEventWireup="false" CodeFile="UC04-060.aspx.vb" Inherits="_114_UC04_060" %>
<asp:Content id="ctUC04060" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    &nbsp;&nbsp;<br />
    <br />
    <br />
    <table style="width: 490px; height: 105px">
        <tr>
            <td style="width: 42px; height: 32px; text-align: center">
                <span style="font-size: 18pt">
                Quản Lý Mã Linh Kiện<br />
                </span>
            </td>
        </tr>
        <tr>
            <td style="width: 42px; height: 621px;">
                
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None"
                    Height="209px" Width="495px" DataKeyNames="MaLoaiLK,TenLK,NhaCC,Url" DataSourceID="SqlDataSource1" PageSize="20">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#EFF3FB" />
                    <EditRowStyle BackColor="#2461BF" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="MaLoaiLK" HeaderText="Ma Loai LK" ReadOnly="True" SortExpression="MaLoaiLK" />
                        <asp:BoundField DataField="TenLK" HeaderText="Ten Linh Kien" SortExpression="TenLK" />
                        <asp:BoundField DataField="NhaCC" HeaderText="Nha cung cap" SortExpression="NhaCC" />
                        <asp:BoundField DataField="Url" HeaderText="Url" SortExpression="Url" />
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    </Columns>
                    <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast"
                        NextPageText="Next" PreviousPageText="Previous" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:HAIDANG_DATABASEConnectionString %>"
                    DeleteCommand="DELETE FROM [LOAILK] WHERE [MaLoaiLK] = @original_MaLoaiLK"
                    InsertCommand="INSERT INTO [LOAILK] ([MaLoaiLK], [TenLK], [NhaCC], [Url]) VALUES (@MaLoaiLK, @TenLK, @NhaCC, @Url)"
                    OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [LOAILK]"
                    UpdateCommand="UPDATE [LOAILK] SET [TenLK] = @TenLK, [NhaCC] = @NhaCC, [Url] = @Url WHERE [MaLoaiLK] = @original_MaLoaiLK">
                    <DeleteParameters>
                        <asp:Parameter Name="original_MaLoaiLK" Type="String" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="TenLK" Type="String" />
                        <asp:Parameter Name="NhaCC" Type="String" />
                        <asp:Parameter Name="Url" Type="String" />
                        <asp:Parameter Name="original_MaLoaiLK" Type="String" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="MaLoaiLK" Type="String" />
                        <asp:Parameter Name="TenLK" Type="String" />
                        <asp:Parameter Name="NhaCC" Type="String" />
                        <asp:Parameter Name="Url" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
               </td>
        </tr>
        <tr>
            <td style="width: 42px">
                </td>
        </tr>
    </table>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />

</asp:Content>